package  com.zerosky.crm.dao;

import java.util.List;
import java.util.Map;

import com.zerosky.crm.po.Customer;

/**Customer数据接口
 * @author hugy;
 * @since 2017-06-08
 */
public interface CustomerDAO{
	
	/**Customer列表数据接口
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public List<Customer> getCustomerList(Map map);
	
	/**查询记录数量
	 * 
	 * @param map
	 * @return
	 */
	public int countCustomer(Map map);
	
	/**验证是否存在相同的手机号码和身份证号码
	 * 
	 * @param map
	 * @return
	 */
	public Customer validateCustomer(Map map);
	
	/**客户登录接口
	 * 
	 * @param map
	 * @return
	 */
	public Customer customerLogin(Map map);

	/**通过主键查找Customer数据接口 
	 * @param id Customer主键
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public Customer getCustomerById(String id);

	/**新增Customer数据接口
	 * @param Customer 实体对象
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public int addCustomer(Customer customer) throws Exception;
	
	/**批量新增Customer数据接口
	 * @param Customer 实体对象
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public int addCustomerList(List<Customer> customer) throws Exception;
	
	/**修改Customer数据接口
	 * @param Customer 实体对象
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public int updateCustomer(Customer customer) throws Exception;
	
	/**删除Customer数据状态接口
	 * @param id Customer主键，status 状态
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public int deleteCustomerById(String id) throws Exception;
	
	/**
	 * 获取到其他部门客户人数
	 * @param deptId
	 * @return
	 */
	public List<Customer> getOtherDeptCustomerNumber(Map map);
	
	/**
	 * 获取到其他部门客户人数
	 * @param deptId
	 * @return
	 */
	public int getOtherDeptCustomerNumberCount(Map map);
	/**
	 * 获取到其他部门客户总人数
	 * @param deptId
	 * @return
	 */
	public int getOtherDeptCustomerNumberSum(Map map);
	
}
